// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import './plugins/element'     // 组件库
import App from './App'
import 'default-passive-events'
import router from './router'
import store from './store'
import './assets/css/reset.scss'// 重置HTML样式
import './assets/css/base.scss' // 全局样式
import './assets/css/el-ui.scss' // 优化element样式
import './assets/css/dark.scss'  // 导入暗黑主题
import '@/components/index'  //注册全局组件
import './assets/css/table.scss'
import  EZUIKit from 'ezuikit-js'
let echarts = require('echarts')
// import * as echarts from 'echarts';
import dataV from '@jiaminghi/data-view'
import http from './utils/request'
import SocketService from "./utils/socket_service"
Vue.config.productionTip = false

// 对服务端进行websocket连接
SocketService.Instance.connect();
SocketService.Instance.send(
  JSON.stringify({
    userId: 6723,
    acceptUser: 1111,
    userName: "zion",
    messageType: 1,
    content: "111"
  })
)

// 去除Chrome警告
import 'default-passive-events'

// Vue.config.productionTip = false
// 滚动插件
import vuescroll from 'vuescroll'      // 滚动插件
Vue.use(vuescroll)
Vue.use(dataV)
Vue.prototype.$socket = SocketService.Instance

new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  // 这个地方后面应该要用 render 优化
  // template: '<App/>'
  render: h => h(App)
})
Vue.prototype.$echarts = echarts
Vue.prototype.$http = http